//
//  TEXMLObjectViewController.m
//  TintExample
//
//  Created by Kevin Wu on 9/5/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import "TEXMLObjectViewController.h"


@implementation TEXMLObjectViewController


#pragma mark - Memory

- (id)init
{
    self = [super init];
    if ( self ) {
        
        NSString *path = [[NSBundle mainBundle] pathForResource:@"xml3.xml" ofType:nil];
        NSData *data = [NSData dataWithContentsOfFile:path];
        
        TTXML *xml = [[TTXML alloc] initWithXMLData:data];
        TTXMLNode *rootNode = [xml rootElement];
        TTXMLNode *node = [rootNode firstChild];
        while ( node ) {
            TEBook *book = [[TEBook alloc] initWithXMLNode:node];
            NSLog(@"%@", book);
            TTRelease(book);
            node = [node nextSibling];
        }
        TTRelease(xml);
        
    }
    return self;
}

- (void)dealloc
{
    [super dealloc];
}


#pragma mark - UIViewController

- (void)loadView
{
    [super loadView];
}

- (void)viewDidLoad
{
    [super viewDidLoad];
}


@end
